3.2.56 \(\int \frac {\sqrt {a+a \cos (x)}}{x^3} \, dx\) [156]

Optimal. Leaf size=67 \[ -\frac {\sqrt {a+a \cos (x)}}{2 x^2}-\frac {1}{8} \sqrt {a+a \cos (x)} \text {CosIntegral}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right )+\frac {\sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )}{4 x} \]

[Out]

-1/2*(a+a*cos(x))^(1/2)/x^2-1/8*Ci(1/2*x)*sec(1/2*x)*(a+a*cos(x))^(1/2)+1/4*(a+a*cos(x))^(1/2)*tan(1/2*x)/x

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3400, 3378, 3383} \begin {gather*} -\frac {1}{8} \text {CosIntegral}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}-\frac {\sqrt {a \cos (x)+a}}{2 x^2}+\frac {\tan \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}}{4 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[x]]/x^3,x]

[Out]

-1/2*Sqrt[a + a*Cos[x]]/x^2 - (Sqrt[a + a*Cos[x]]*CosIntegral[x/2]*Sec[x/2])/8 + (Sqrt[a + a*Cos[x]]*Tan[x/2])
/(4*x)

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3400

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(2*a)^IntPart[n]
*((a + b*Sin[e + f*x])^FracPart[n]/Sin[e/2 + a*(Pi/(4*b)) + f*(x/2)]^(2*FracPart[n])), Int[(c + d*x)^m*Sin[e/2
 + a*(Pi/(4*b)) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {\sqrt {a+a \cos (x)}}{x^3} \, dx &=\left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\cos \left (\frac {x}{2}\right )}{x^3} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{2 x^2}-\frac {1}{4} \left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\sin \left (\frac {x}{2}\right )}{x^2} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{2 x^2}+\frac {\sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )}{4 x}-\frac {1}{8} \left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\cos \left (\frac {x}{2}\right )}{x} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{2 x^2}-\frac {1}{8} \sqrt {a+a \cos (x)} \text {Ci}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right )+\frac {\sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )}{4 x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 44, normalized size = 0.66 \begin {gather*} -\frac {\sqrt {a (1+\cos (x))} \left (4+x^2 \text {CosIntegral}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right )-2 x \tan \left (\frac {x}{2}\right )\right )}{8 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[x]]/x^3,x]

[Out]

-1/8*(Sqrt[a*(1 + Cos[x])]*(4 + x^2*CosIntegral[x/2]*Sec[x/2] - 2*x*Tan[x/2]))/x^2

________________________________________________________________________________________

Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {\sqrt {a +a \cos \left (x \right )}}{x^{3}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*cos(x))^(1/2)/x^3,x)

[Out]

int((a+a*cos(x))^(1/2)/x^3,x)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.54, size = 19, normalized size = 0.28 \begin {gather*} \frac {1}{8} \, \sqrt {2} \sqrt {a} {\left (\Gamma \left (-2, \frac {1}{2} i \, x\right ) + \Gamma \left (-2, -\frac {1}{2} i \, x\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^3,x, algorithm="maxima")

[Out]

1/8*sqrt(2)*sqrt(a)*(gamma(-2, 1/2*I*x) + gamma(-2, -1/2*I*x))

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^3,x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\cos {\left (x \right )} + 1\right )}}{x^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))**(1/2)/x**3,x)

[Out]

Integral(sqrt(a*(cos(x) + 1))/x**3, x)

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 48, normalized size = 0.72 \begin {gather*} -\frac {\sqrt {2} {\left (x^{2} \operatorname {Ci}\left (\frac {1}{2} \, x\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) - 2 \, x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \sin \left (\frac {1}{2} \, x\right ) + 4 \, \cos \left (\frac {1}{2} \, x\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right )\right )} \sqrt {a}}{8 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^3,x, algorithm="giac")

[Out]

-1/8*sqrt(2)*(x^2*cos_integral(1/2*x)*sgn(cos(1/2*x)) - 2*x*sgn(cos(1/2*x))*sin(1/2*x) + 4*cos(1/2*x)*sgn(cos(
1/2*x)))*sqrt(a)/x^2

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+a\,\cos \left (x\right )}}{x^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*cos(x))^(1/2)/x^3,x)

[Out]

int((a + a*cos(x))^(1/2)/x^3, x)

________________________________________________________________________________________